package com.idfsgm;

import com.example.idfsgm.R;
import com.example.idfsgm.R.layout;
import com.example.idfsgm.R.menu;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.graphics.BitmapFactory.Options;
import android.view.Menu;
import android.view.MenuItem;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {

		menu.add("settings").setIcon(R.drawable.gaurd);
		menu.add("new kitchen service").setIcon(
				android.R.drawable.ic_popup_sync);
		menu.add("new Guard service").setIcon(android.R.drawable.ic_popup_sync);
		menu.add("logout").setIcon(R.drawable.gaurd);
		return super.onCreateOptionsMenu(menu);
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {

		if (item.getTitle().equals("settings")) {
			Intent intent = new Intent(getBaseContext(), SettingsActivity.class);
			startActivity(intent);
		}
		return super.onOptionsItemSelected(item);
	}

}
